import {
  Entity,
  Column,
  PrimaryGeneratedColumn,
  // 自增
  CreateDateColumn,
} from 'typeorm';
import { ColumnStatus } from './yixiantong.type';

@Entity()
export class YixiantongFieldsGoodsService {
  @PrimaryGeneratedColumn({
    comment: '一线通条目的关联ID (仅在付费项目中包含)',
    type: 'bigint',
    name: 'yixiantong_field_id',
  })
  public id: number;

  @Column({
    comment: '停车场',
    type: 'varchar',
    length: 255,
    nullable: true,
  })
  public parking: string;

  @Column({
    comment: 'wifi',
    type: 'varchar',
    length: 255,
    nullable: true,
  })
  public wifi: string;

  @CreateDateColumn({
    comment: '创建时间',
    name: 'create_time',
    type: 'datetime',
    nullable: false, // 非空
    default: null // 设置默认值为当前时间戳
  })
  public createTime: Date;

  @CreateDateColumn({
    comment: '更新时间',
    name: 'update_time',
    type: 'datetime',
    nullable: false, // 非空
    default: null // 设置默认值为当前时间戳
  })
  public updateTime: Date;

  @Column({
    comment: '状态',
    default: ColumnStatus.Normal,
  })
  public status: ColumnStatus;
}